<template>
    <div class="problem-detail-view">

      <el-row>

<!--        <el-form :inline="true" :model="data" class="demo-form-inline" label-width="110px" size="medium" label-position="left" >-->

<!--          <el-col :span="12">-->
<!--            <el-form-item label="问题名称：">-->
<!--              <span>{{data.problem_name}}</span>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          <el-col :span="12">-->
<!--            <el-form-item label="问题编号：">-->
<!--              <div>{{data.problem_no}}</div>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          <el-col :span="12">-->
<!--            <el-form-item label="问题类型：">-->
<!--              <div>{{data.problem_type}}</div>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          <el-col :span="12">-->
<!--            <el-form-item label="优先级：">-->
<!--              <div>{{data.priority}}</div>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          <el-col :span="12">-->
<!--            <el-form-item label="负责人：">-->
<!--              <div>{{data.functionary}}</div>-->

<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          <el-col :span="12">-->
<!--            <el-form-item label="期望完成时间：">-->
<!--              <div>{{dateFormat1('yyyy-mm-dd',data.expect_end_time)}}</div>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          <el-col :span="12">-->
<!--            <el-form-item label="所属任务：">-->
<!--              <div>{{data.task_name}}</div>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--          <el-col>-->
<!--            <el-form-item label="问题描述：">-->
<!--              <div>{{data.problem_describe}}</div>-->
<!--            </el-form-item>-->
<!--          </el-col>-->

<!--        </el-form>-->

        <el-row>

          <el-col :span="12">
            <div class="problem-item">
              <div class="title">问题名称：</div>
              <span class="problem-item-content">{{data.problem_name}}</span>
            </div>
          </el-col>

          <el-col :span="12">
            <div class="problem-item">
              <div class="title">问题编号：</div>
              <span class="problem-item-content">{{data.problem_no}}</span>
            </div>
          </el-col>

          <el-col :span="12">
            <div class="problem-item">
              <div class="title">问题类型：</div>
              <span class="problem-item-content">{{data.problem_type}}</span>
            </div>
          </el-col>

          <el-col :span="12">
            <div class="problem-item">
              <div class="title">优先级：</div>
              <span class="problem-item-content">{{data.priority}}</span>
            </div>
          </el-col>

          <el-col :span="12">
            <div class="problem-item">
              <div class="title">负责人：</div>
              <span class="problem-item-content">{{data.functionary}}</span>
            </div>
          </el-col>

          <el-col :span="12">
            <div class="problem-item">
              <div class="title">期望完成时间：</div>
              <div class="problem-item-content">{{dateFormat1('yyyy-mm-dd',data.expect_end_time)}}</div>
            </div>
          </el-col>

          <el-col :span="12">
            <div class="problem-item">
              <div class="title">所属任务：</div>
              <div class="problem-item-content">{{data.task_name}}</div>
            </div>
          </el-col>

          <el-col>
            <div class="problem-item">
              <div class="title">问题描述：</div>
              <div class="problem-item-content">{{data.problem_describe}}</div>
            </div>
          </el-col>

        </el-row>

      </el-row>

      <el-row v-if="data.result_describe">

        <el-form :model="data" class="demo-form-inline" label-width="110px" size="medium" label-position="left" >

          <el-col :span="24">
            <el-form-item label="反馈结果描述：">
              <div>{{data.result_describe}}</div>
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="反馈结果备注：">
              <div>{{data.remark}}</div>
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="附件：">
              <file-preview :file-list="data.accessory" />
            </el-form-item>
          </el-col>

        </el-form>

      </el-row>

      <el-row v-if="data.problem_result">

        <el-form :model="data" class="demo-form-inline" label-width="110px" size="medium" label-position="left" >

          <el-col :span="24">
            <el-form-item label="问题确认结果：">
              <div>{{data.problem_result == 1 ? "已解决关闭问题" : "未解决继续问题"}}</div>
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="确认意见：">
              <div>{{data.acceptance_opinion}}</div>
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="确认结果备注：">
              <div>{{data.remark_result}}</div>
            </el-form-item>
          </el-col>

        </el-form>

      </el-row>

    </div>
</template>

<script>
    export default {
        name: "problemDetailView",
        props:{
            data:Object,
        },
        data:function () {
            return{

            }
        },
    }
</script>

<style lang="scss" scoped>
  .problem-item{
    display: flex;
    margin-bottom: 20px;
    .title{
      min-width: max-content
    }
    .problem-item-content{
      margin: 0 20px 0 10px;
    }
  }
</style>
